<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Add Supplier</title>
</head>
<body>
	<form:form method="post" modelAttribute="supplierListForm"
		id="addSupplierForm" class="cmxform">
		<table class="table1">
			<tr>
				<td class="td1">Sr. No.</td>
				<td class="td1">TIN NUMBER</td>
				<td class="td1">SUPPLIER NAME</td>
				<td class="td1">SUPPLIER ADDRESS</td>
				<td class="td1">SUPPLIER EMAIL ID</td>
				<td class="td1">SUPPLIER PHONE NUMBER</td>
				<td class="td1">SUPPLIER MOBILE NUMBER</td>
				<td class="td1">MONTH</td>
				<td class="td1">YEAR</td>
			</tr>
			<c:forEach items="${supplierListForm.supplierList}" var="supplier"
				varStatus="i">
				<tr>
					<td align="center">${i.count}</td>
					<td><form:input path="supplierList[${i.index}].tinNumber" /></td>
					<td><form:input path="supplierList[${i.index}].supplierName" /></td>
					<td><form:input
							path="supplierList[${i.index}].supplierAddress" /></td>
					<td><form:input
							path="supplierList[${i.index}].supplierEmailId" /></td>
					<td><form:input
							path="supplierList[${i.index}].supplierPhoneNumber" /></td>
					<td><form:input
							path="supplierList[${i.index}].supplierMobileNumber" /></td>
					<td> <form:select path="supplierList[${i.index}].month">
							<form:options items="${monthMap}"/>
						</form:select>
					<td><form:select path="supplierList[${i.index}].year">
							<form:options items="${yearMap}"/>
						</form:select>
				</tr>
			</c:forEach>
			<tr>
				<td>&nbsp;</td>
				<td colspan="5"><input type="submit" value="SUBMIT">&nbsp;
					&nbsp;<input type="button" value="CANCEL"></td>
			</tr>
		</table>
	</form:form>
	
			<!-- our error container -->
		<div class="container">
			<h4>There are serious errors in your form submission, please see below for details.</h4>
			<ol>
				<li>
					<label for="email" class="error">Please enter your email address</label>
				</li>
				<li>
					<label for="phone" class="error">Please enter your phone <b>number</b> (between 2 and 8 characters)</label>
				</li>
				<li>
					<label for="address" class="error">Please enter your address (at least 3 characters)</label>
				</li>
				<li>
					<label for="avatar" class="error">Please select an image (png, jpg, jpeg, gif)</label>
				</li>
				<li>
					<label for="cv" class="error">Please select a document (doc, docx, txt, pdf)</label>
				</li>
			</ol>
		</div>
</body>
</html>